<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon32.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon16.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT">










<meta name="description" content="线性模型基本形式给定d个属性的实例$x=(x_1;x_2;……;x_d)$，线性模型试图通过线性组合进行函数预测： f(x)=w_1x_1+w_2x_2+...+w_dx_d+b向量形式： f(x)=\overrightarrow w^T\overrightarrow x+b优点：解释性好，从系数可以看出变量影响程度。 很多更强大的非线性模型，可在线性模型上通过引入层级结构或高维映射获得。 线性回">
<meta property="og:type" content="article">
<meta property="og:title" content="机器学习西瓜书 （三）线性模型">
<meta property="og:url" content="http://yoursite.com/2019/03/01/机器学习西瓜书-（三）线性模型/index.html">
<meta property="og:site_name" content="Avalon">
<meta property="og:description" content="线性模型基本形式给定d个属性的实例$x=(x_1;x_2;……;x_d)$，线性模型试图通过线性组合进行函数预测： f(x)=w_1x_1+w_2x_2+...+w_dx_d+b向量形式： f(x)=\overrightarrow w^T\overrightarrow x+b优点：解释性好，从系数可以看出变量影响程度。 很多更强大的非线性模型，可在线性模型上通过引入层级结构或高维映射获得。 线性回">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551419270x2890149512.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551419302x2890149512.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551419325x2890149512.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551419540x2890149512.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551419854x2890149512.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551420749x2728278668.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551420770x2728278668.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551420793x2728278668.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551420824x2728278668.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551421435x2728278692.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551421624x2728278692.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551421756x2728278692.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551421875x2728278692.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551422118x2728278692.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551422300x2728278692.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551422443x2728278692.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551422495x2728278692.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551422625x2728278692.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551422990x2728278692.jpg">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551423211x2728278692.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551423234x2728278692.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551423327x2728278692.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551423656x2728278692.png">
<meta property="og:image" content="http://thyrsi.com/t6/675/1551423800x2728278692.png">
<meta property="og:updated_time" content="2019-03-01T07:03:28.877Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="机器学习西瓜书 （三）线性模型">
<meta name="twitter:description" content="线性模型基本形式给定d个属性的实例$x=(x_1;x_2;……;x_d)$，线性模型试图通过线性组合进行函数预测： f(x)=w_1x_1+w_2x_2+...+w_dx_d+b向量形式： f(x)=\overrightarrow w^T\overrightarrow x+b优点：解释性好，从系数可以看出变量影响程度。 很多更强大的非线性模型，可在线性模型上通过引入层级结构或高维映射获得。 线性回">
<meta name="twitter:image" content="http://thyrsi.com/t6/675/1551419270x2890149512.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2019/03/01/机器学习西瓜书-（三）线性模型/">





  <title>机器学习西瓜书 （三）线性模型 | Avalon</title>
  








</head>

<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>
	<a href="https://github.com/jarvishou829" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewbox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
    <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Avalon</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">By Jarvis Hou</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-search">
          <a href="/search/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-search"></i> <br>
            
            搜索
          </a>
        </li>
      
        
        <li class="menu-item menu-item-commonweal">
          <a href="/404/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-heartbeat"></i> <br>
            
            公益404
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2019/03/01/机器学习西瓜书-（三）线性模型/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Jarvis Hou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/blog_logo.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Avalon">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">机器学习西瓜书 （三）线性模型</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-03-01T13:10:41+08:00">
                2019-03-01
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="线性模型"><a href="#线性模型" class="headerlink" title="线性模型"></a>线性模型</h1><h2 id="基本形式"><a href="#基本形式" class="headerlink" title="基本形式"></a>基本形式</h2><p>给定d个属性的实例$x=(x_1;x_2;……;x_d)$，线性模型试图通过线性组合进行函数预测：</p>
<script type="math/tex; mode=display">f(x)=w_1x_1+w_2x_2+...+w_dx_d+b</script><p>向量形式：</p>
<script type="math/tex; mode=display">f(x)=\overrightarrow w^T\overrightarrow x+b</script><p>优点：解释性好，从系数可以看出变量影响程度。</p>
<p>很多更强大的非线性模型，可在线性模型上通过引入层级结构或高维映射获得。</p>
<h2 id="线性回归"><a href="#线性回归" class="headerlink" title="线性回归"></a>线性回归</h2><p>给定数据集$D=\{(x_1,y_1),(x_2,y_2),…(x_d,y_d) \}$，其中$x_i=(x_{i_1};x_{i_2};…;x_{i_d})$，$y_i\in R$</p>
<h3 id="数值类型"><a href="#数值类型" class="headerlink" title="数值类型"></a>数值类型</h3><ol>
<li>实数值</li>
<li>序数值，比如高中低可转化为{1，0.5，0}</li>
<li>枚举值，若k个属性值，转化为k维向量，比如红绿蓝，转化为(0,0,1),(0,1,0),(1,0,0)<h3 id="均方误差"><a href="#均方误差" class="headerlink" title="均方误差"></a>均方误差</h3>线性回归目标函数：<script type="math/tex; mode=display">f(x_i)=wx_i+b, \space \space s.t.\space \space f(x_i)\simeq y_i</script>最常用的性能度量：均方误差</li>
</ol>
<p>基于均方误差最小化进行模型求解，称为最小二乘法。<br>目标函数：</p>
<script type="math/tex; mode=display">E(w,b)=\sum_{i=1}^m (y_i-wx_i-b)^2</script><h3 id="求解最小二乘"><a href="#求解最小二乘" class="headerlink" title="求解最小二乘"></a>求解最小二乘</h3><p>参数估计，对w和b求导，偏导数为0。</p>
<p>求解得结果</p>
<script type="math/tex; mode=display">w=\frac{\sum_{i=1}^m y_i(x_i-\overline x)}{\sum_{i=1}^m x_i^2-\frac 1 m (\sum_{i=1}^m x_i)^2}</script><script type="math/tex; mode=display">b=\frac 1 m \sum_{i=1}^m(y_i-wx_i)</script><p>其中$\overline x=\frac 1 m \sum_{i=1}^mx_i$为x的均值</p>
<h3 id="多元扩展"><a href="#多元扩展" class="headerlink" title="多元扩展"></a>多元扩展</h3><p><img src="http://thyrsi.com/t6/675/1551419270x2890149512.jpg" alt=""><br><img src="http://thyrsi.com/t6/675/1551419302x2890149512.jpg" alt=""><br><img src="http://thyrsi.com/t6/675/1551419325x2890149512.jpg" alt=""></p>
<h2 id="对数几率回归"><a href="#对数几率回归" class="headerlink" title="对数几率回归"></a>对数几率回归</h2><p>对于分类任务，可用单调可微函数将真实标记Y与线性回归模型的预测值联系起来。不能直接线性拟合：<br><img src="http://thyrsi.com/t6/675/1551419540x2890149512.png" alt=""><br>单位阶跃函数：</p>
<script type="math/tex; mode=display">y = \begin{cases} 0, & z<0 \\ 0.5, & z=0 \\ 1, & z>0 \end{cases}</script><p>对比两个函数<br><img src="http://thyrsi.com/t6/675/1551419854x2890149512.jpg" alt=""><br>对数几率函数的反函数：</p>
<script type="math/tex; mode=display">y=\frac 1 {1+e^{-(w^Tx+b)}}</script><p>变换：</p>
<script type="math/tex; mode=display">ln\frac y {1-y}=w^Tx+b</script><p>将y视为样本x为正例的可能性，则1-y是反例可能性。<br>用线性回归模型的预测结果，去逼近真实标记的对数几率。</p>
<script type="math/tex; mode=display">ln\frac y {1-y}</script><p>优点：</p>
<ol>
<li>直接对分类可能性建模，无需事先假设数据分布，避免假设分布不准确的问题</li>
<li>除了类别，给出了精确概率</li>
<li>是任意阶可导的凸函数，很多数值优化算法可直接求取最优解<br><img src="http://thyrsi.com/t6/675/1551420749x2728278668.jpg" alt=""><br><img src="http://thyrsi.com/t6/675/1551420770x2728278668.jpg" alt=""><h3 id="梯度下降法"><a href="#梯度下降法" class="headerlink" title="梯度下降法"></a>梯度下降法</h3><img src="http://thyrsi.com/t6/675/1551420793x2728278668.png" alt=""><h3 id="牛顿法"><a href="#牛顿法" class="headerlink" title="牛顿法"></a>牛顿法</h3><img src="http://thyrsi.com/t6/675/1551420824x2728278668.jpg" alt=""></li>
</ol>
<h2 id="线性判别分析"><a href="#线性判别分析" class="headerlink" title="线性判别分析"></a>线性判别分析</h2><p>由统计家Fisher提出，也称为Fisher判别分析。</p>
<p>LDA基本思想：给定训练样例集，设法将样例投影到一条直线，使同类别投影点尽可能近，异类尽可能远。<br><img src="http://thyrsi.com/t6/675/1551421435x2728278692.jpg" alt=""><br><img src="http://thyrsi.com/t6/675/1551421624x2728278692.jpg" alt=""></p>
<h3 id="类内-间散度矩阵"><a href="#类内-间散度矩阵" class="headerlink" title="类内/间散度矩阵"></a>类内/间散度矩阵</h3><p><img src="http://thyrsi.com/t6/675/1551421756x2728278692.jpg" alt=""><br><img src="http://thyrsi.com/t6/675/1551421875x2728278692.png" alt=""></p>
<h3 id="拉格朗日乘子"><a href="#拉格朗日乘子" class="headerlink" title="拉格朗日乘子"></a>拉格朗日乘子</h3><p><img src="http://thyrsi.com/t6/675/1551422118x2728278692.png" alt=""></p>
<h4 id="向量求导"><a href="#向量求导" class="headerlink" title="向量求导"></a>向量求导</h4><p><img src="http://thyrsi.com/t6/675/1551422300x2728278692.png" alt=""><br><img src="http://thyrsi.com/t6/675/1551422443x2728278692.jpg" alt=""></p>
<h4 id="推广"><a href="#推广" class="headerlink" title="推广"></a>推广</h4><p><img src="http://thyrsi.com/t6/675/1551422495x2728278692.png" alt=""><br><img src="http://thyrsi.com/t6/675/1551422625x2728278692.jpg" alt=""></p>
<h2 id="多分类学习"><a href="#多分类学习" class="headerlink" title="多分类学习"></a>多分类学习</h2><p>基本思路：拆解法，将多分类任务拆为若干个二分类任务求解。</p>
<h3 id="OvO（一对一）"><a href="#OvO（一对一）" class="headerlink" title="OvO（一对一）"></a>OvO（一对一）</h3><p>将N个类别两两配对，产生N(N-1)/2个二分类任务。<br>在测试阶段，将新样本交给所有分类器，投票产生分类结果。</p>
<h3 id="OvR（一对余）"><a href="#OvR（一对余）" class="headerlink" title="OvR（一对余）"></a>OvR（一对余）</h3><p>每次将一个类视为正例，剩余其他类作为反例，gognN个分类器。<br><img src="http://thyrsi.com/t6/675/1551422990x2728278692.jpg" alt=""></p>
<h3 id="MvM（多对多）"><a href="#MvM（多对多）" class="headerlink" title="MvM（多对多）"></a>MvM（多对多）</h3><p><img src="http://thyrsi.com/t6/675/1551423211x2728278692.png" alt=""><br><img src="http://thyrsi.com/t6/675/1551423234x2728278692.png" alt=""></p>
<h2 id="类别不平衡问题"><a href="#类别不平衡问题" class="headerlink" title="类别不平衡问题"></a>类别不平衡问题</h2><p><img src="http://thyrsi.com/t6/675/1551423327x2728278692.png" alt=""></p>
<h3 id="欠采样"><a href="#欠采样" class="headerlink" title="欠采样"></a>欠采样</h3><p>去除一些反例，来调整正反例比例。（比如接近）</p>
<p>缺点：丢失了一些训练集</p>
<p>EasyEnsemble算法：利用集成学习机制，将反例划分为若干不同集合供不同学习器使用，全局看，不再丢失信息。</p>
<h3 id="过采样"><a href="#过采样" class="headerlink" title="过采样"></a>过采样</h3><p>增加一些正例，控制正反例比例。<br>不能简单对正例进行重复采样，否则会严重过拟合。</p>
<p>SMOTE算法：通过对训练集里的正例进行插值来产生额外的正例。<br><img src="http://thyrsi.com/t6/675/1551423656x2728278692.png" alt=""></p>
<h3 id="阈值移动"><a href="#阈值移动" class="headerlink" title="阈值移动"></a>阈值移动</h3><p>用原始数据集，决策时，用再放缩的阈值。</p>
<h2 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h2><p><img src="http://thyrsi.com/t6/675/1551423800x2728278692.png" alt=""></p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2019/03/01/机器学习西瓜书-（二）模型评估与选择/" rel="next" title="机器学习西瓜书 （二）模型评估与选择">
                <i class="fa fa-chevron-left"></i> 机器学习西瓜书 （二）模型评估与选择
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/blog_logo.jpg" alt="Jarvis Hou">
            
              <p class="site-author-name" itemprop="name">Jarvis Hou</p>
              <p class="site-description motion-element" itemprop="description">生如逆旅 一苇以航</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">4</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            

            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#线性模型"><span class="nav-number">1.</span> <span class="nav-text">线性模型</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#基本形式"><span class="nav-number">1.1.</span> <span class="nav-text">基本形式</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#线性回归"><span class="nav-number">1.2.</span> <span class="nav-text">线性回归</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#数值类型"><span class="nav-number">1.2.1.</span> <span class="nav-text">数值类型</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#均方误差"><span class="nav-number">1.2.2.</span> <span class="nav-text">均方误差</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#求解最小二乘"><span class="nav-number">1.2.3.</span> <span class="nav-text">求解最小二乘</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#多元扩展"><span class="nav-number">1.2.4.</span> <span class="nav-text">多元扩展</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#对数几率回归"><span class="nav-number">1.3.</span> <span class="nav-text">对数几率回归</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#梯度下降法"><span class="nav-number">1.3.1.</span> <span class="nav-text">梯度下降法</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#牛顿法"><span class="nav-number">1.3.2.</span> <span class="nav-text">牛顿法</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#线性判别分析"><span class="nav-number">1.4.</span> <span class="nav-text">线性判别分析</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#类内-间散度矩阵"><span class="nav-number">1.4.1.</span> <span class="nav-text">类内/间散度矩阵</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#拉格朗日乘子"><span class="nav-number">1.4.2.</span> <span class="nav-text">拉格朗日乘子</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#向量求导"><span class="nav-number">1.4.2.1.</span> <span class="nav-text">向量求导</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#推广"><span class="nav-number">1.4.2.2.</span> <span class="nav-text">推广</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#多分类学习"><span class="nav-number">1.5.</span> <span class="nav-text">多分类学习</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#OvO（一对一）"><span class="nav-number">1.5.1.</span> <span class="nav-text">OvO（一对一）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#OvR（一对余）"><span class="nav-number">1.5.2.</span> <span class="nav-text">OvR（一对余）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#MvM（多对多）"><span class="nav-number">1.5.3.</span> <span class="nav-text">MvM（多对多）</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#类别不平衡问题"><span class="nav-number">1.6.</span> <span class="nav-text">类别不平衡问题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#欠采样"><span class="nav-number">1.6.1.</span> <span class="nav-text">欠采样</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#过采样"><span class="nav-number">1.6.2.</span> <span class="nav-text">过采样</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#阈值移动"><span class="nav-number">1.6.3.</span> <span class="nav-text">阈值移动</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#扩展"><span class="nav-number">1.7.</span> <span class="nav-text">扩展</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Jarvis Hou</span>

  
</div>


  <div class="powered-by">驱动者是 Hexo desu~</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题嘛~是 NexT poi</div>



        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  

</body>
</html>
